<h3>Delete Location</h3>
    <form id="cat_delete" action="#" method="post" onsubmit="return false">
    <?php if ($has_resources){ ?>
        <?php if(count($categories) == 0) { ?>
            <p>There are no other categories to assign resources to.</p><p>Please create a category, then attempt to delete '<?php echo $name; ?>' again.</p>
            <p><small>[ <a href="javascript:hide_element('AJAX_update')">Hide this message</a> ]</small></p>
            <?php exit(); ?>
        <?php } else { ?>
            <p>Please confirm that you wish to delete the category '<?php echo $name;?>'.</p>
            <p>This catgory has resources assigned to it. Please choose a new category for these resources below.</p>
            <p><?php echo $category_list; ?></p> 
        <?php } ?>
    <?php } ?>
    <p>
        <input type="hidden" name="has_resources" value="<?php echo $has_resources;?>" />
        <input type="hidden" name="id" value="<?php echo $id;?>" />
        <input onclick="ajax_form_submit('cat_delete', 'AJAX_update', 'admin.php?tab=resources&amp;cat&amp;mode=delete&amp;ajax',true,'<?php echo $update;?>', 'admin.php?tab=resources&amp;cat&amp;ajax')" type="button" name="submit" value="Delete" />
        <input type="button" onclick="hide_element('AJAX_update')" value="Cancel" />
    </p>
    </form>
